//package com.project.stream_producer.demo2.controller;
//
//import com.project.stream_producer.demo2.service.MessageProducer;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//@RestController
//public class SendController {
//    @Autowired
//    MessageProducer messageProducer;
//    @GetMapping("sendMsg")
//    public void sendMsg(){
//        for (int i = 0; i < 10; i++) {
//            System.out.println(messageProducer.send(i+""));
//        }
//    }
//}
